home *** CD-ROM | disk | FTP | other *** search
- From: ChrisHines@msn.com (Chris Hines)
- Subject: Re: Arrays or Pointers?
- Date: 11 Apr 96 05:24:13 -0700
- References: <4kbsk3$f07@zeus.tcp.co.uk> <316AB218.167E@rchland.ibm.com>
- Message-ID: <00001a81+0000b1d4@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
- David wrote:
- >
- > I'm currently on a C++ course and we seem to be using pointers a fair
- > bit. On questioning this, was told that pointers where quicker than
- > using arrays. In which situations should I be using arrays over
- > pointers and vice versa?
-
- Most optimizing compilers will turn loops over an array using a
- simple index variable into virtually the same machine instructions as
- a loop using pointers. It all depends on how complicated the loop
- is, and how good the compiler is.
-
- -----
- Chris Hines ChrisHines@msn.com
-